import { GET_POSTS } from '../actions';
import { GET_CATEGORIES } from '../actions';


const defaultState = {
    categories: []
};

//console.log(JSON.stringify(defaultState));


export default function categories(state = defaultState,action) {
    switch (action.type) {
        case GET_CATEGORIES:
            return {
              categories: action.payload.data,
            }

        default:
            return state;

    }

}